package com.ruoyi.spot.openapi.createNewOrder.service.impl;

import java.util.List;

import com.ruoyi.spot.openapi.createNewOrder.domain.VO.SpotOpenapiCreateNewOrderVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.openapi.createNewOrder.mapper.SpotOpenapiCreateNewOrderMapper;
import com.ruoyi.spot.openapi.createNewOrder.domain.SpotOpenapiCreateNewOrder;
import com.ruoyi.spot.openapi.createNewOrder.service.ISpotOpenapiCreateNewOrderService;

/**
 * 创建新订单Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-13
 */
@Service
public class SpotOpenapiCreateNewOrderServiceImpl implements ISpotOpenapiCreateNewOrderService 
{
    @Autowired
    private SpotOpenapiCreateNewOrderMapper spotOpenapiCreateNewOrderMapper;

    /**
     * 查询创建新订单
     * 
     * @param id 创建新订单主键
     * @return 创建新订单
     */
    @Override
    public SpotOpenapiCreateNewOrderVO selectSpotOpenapiCreateNewOrderById(Integer id)
    {
        return spotOpenapiCreateNewOrderMapper.selectSpotOpenapiCreateNewOrderById(id);
    }

    /**
     * 查询创建新订单列表
     * 
     * @param spotOpenapiCreateNewOrder 创建新订单
     * @return 创建新订单
     */
    @Override
    public List<SpotOpenapiCreateNewOrderVO> selectSpotOpenapiCreateNewOrderList(SpotOpenapiCreateNewOrderVO spotOpenapiCreateNewOrder)
    {
        return spotOpenapiCreateNewOrderMapper.selectSpotOpenapiCreateNewOrderList(spotOpenapiCreateNewOrder);
    }

    @Override
    public List<SpotOpenapiCreateNewOrderVO> selectSpotAllData() {
        return spotOpenapiCreateNewOrderMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotOpenapiCreateNewOrderMapper.queryCurryNumber(currencyPair);
    }

    /**
     * 新增创建新订单
     * 
     * @param spotOpenapiCreateNewOrder 创建新订单
     * @return 结果
     */
    @Override
    public int insertSpotOpenapiCreateNewOrder(SpotOpenapiCreateNewOrder spotOpenapiCreateNewOrder)
    {
        return spotOpenapiCreateNewOrderMapper.insertSpotOpenapiCreateNewOrder(spotOpenapiCreateNewOrder);
    }

    /**
     * 修改创建新订单
     * 
     * @param spotOpenapiCreateNewOrder 创建新订单
     * @return 结果
     */
    @Override
    public int updateSpotOpenapiCreateNewOrder(SpotOpenapiCreateNewOrder spotOpenapiCreateNewOrder)
    {
        return spotOpenapiCreateNewOrderMapper.updateSpotOpenapiCreateNewOrder(spotOpenapiCreateNewOrder);
    }

    /**
     * 批量删除创建新订单
     * 
     * @param ids 需要删除的创建新订单主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiCreateNewOrderByIds(Integer[] ids)
    {
        return spotOpenapiCreateNewOrderMapper.deleteSpotOpenapiCreateNewOrderByIds(ids);
    }

    /**
     * 删除创建新订单信息
     * 
     * @param id 创建新订单主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiCreateNewOrderById(Integer id)
    {
        return spotOpenapiCreateNewOrderMapper.deleteSpotOpenapiCreateNewOrderById(id);
    }
}
